/*
  *personalType:判断当前用户身份 0：买家 1：卖家
  *个人中心 icon图标命名规范 买家：buyer-style(x)-(y).png 卖家：seller-style(x)-(y).png
  *icon下载尺寸大小为48
  *styleType:  10:风格1 11:风格2 12:风格3 13:风格4 14:风格5 15:风格6
*/
export function appIcon(styleType, personalType) {
  let iconList = personalType === 0 ? buyerIcon(styleType) : sellerIcon(styleType)
  return iconList
}
// typeId key为风格值 val为图片命名中的x值
let typeId = {
  10: 1,
  11: 2,
  12: 3,
  13: 4,
  14: 5,
  15: 6
}
// 获取买家图标
function buyerIcon(styleType) {
  let tempList = {}
  tempList.icon1 = `/images/iconstyle/buyer-style${typeId[styleType]}-1.png`
  tempList.icon2 = `/images/iconstyle/buyer-style${typeId[styleType]}-2.png`
  tempList.icon3 = `/images/iconstyle/buyer-style${typeId[styleType]}-3.png`
  tempList.icon4 = `/images/iconstyle/buyer-style${typeId[styleType]}-4.png`
  return tempList
}

// 获取卖家图标
function sellerIcon(styleType) {
  let tempList = {}
  tempList.icon1 = `/images/iconstyle/seller-type${typeId[styleType]}-1.png`
  tempList.icon2 = `/images/iconstyle/seller-style${typeId[styleType]}-2.png`
  tempList.icon3 = `/images/iconstyle/seller-style${typeId[styleType]}-3.png`
  tempList.icon4 = `/images/iconstyle/seller-style${typeId[styleType]}-4.png`
  tempList.icon5 = `/images/iconstyle/seller-type${typeId[styleType]}-5.png`
  return tempList
}
